﻿@using DevExpress.Web.ASPxEditors
@using DevExpress.Web.Mvc.UI
@using Dogshow.Web.Controllers
@model int?
           

@Html.DevExpress().ComboBox(s =>
{
    s.Name = "IdMajke";
    s.ShowModelErrors = true;
    s.Properties.DropDownRows = 15;
    s.Properties.ValueType = typeof(int);
    s.Properties.ValueField = "Id";
    s.Properties.TextField = "ImePsa";
    s.Properties.IncrementalFilteringMode = IncrementalFilteringMode.Contains;
    s.Properties.EnableCallbackMode = true;
    s.CallbackRouteValues = new { Controller = "Psi", Action = "MajkaPsaComboBoxCallback" };
    s.ControlStyle.CssClass = "editor";
    s.Properties.Columns.Add("BrojRodovnika");
    s.Properties.Columns.Add("ImePsa");
    s.Properties.Buttons.Add(new EditButton("+") { ToolTip = "Dodaj novog psa" });
    var refreshBtn = new EditButton();
    refreshBtn.Image.Url = @Url.Content("~/Content/images/refresh.png");
    s.Properties.Buttons.Add(refreshBtn);
    s.Properties.ClientSideEvents.ButtonClick = "otvoriUnosPsaUNovomTabu";
}).BindList(PsiController.FiltrirajPsePoBrojuRodovnika, PsiController.FiltrirajPsePoId).BindList(PsiController.VratiPsaPoId(Model)).Bind(Model).GetHtml()
      

